<?php

/**
 * Created by JetBrains PhpStorm.
 * User: root
 * Date: 10/4/12
 * Time: 11:42 PM
 * To change this template use File | Settings | File Templates.
 */
class Router_ModRewrite extends Router_Abstract implements Router_Interface
{

    public function processRoute()
    {
        
        $urlPostfixArray = Router_Abstract::getUrlPostfix(TRUE);

        $this->module = (!empty($urlPostfixArray[0]) && $urlPostfixArray[0] != '') ? $urlPostfixArray[0] : Config::get('default_module');

        $this->controller = (!empty($urlPostfixArray[1]) && $urlPostfixArray[1] != '') ? $urlPostfixArray[1] : Config::get('default_controller');

        $this->action = (!empty($urlPostfixArray[2]) && $urlPostfixArray[2] != '') ? $urlPostfixArray[2] : Config::get('default_action');

    }

    public function getLink($module, $controller, $action, $params = array(), $retainOtherParams = FALSE)
    {
        
    }

}